#ifndef BOTTOMDOCKWIDGET_H
#define BOTTOMDOCKWIDGET_H

#include <QDockWidget>
#include "BottomDockTitleWidget.h"

class QStackedWidget;
class Console;
class SearchResult;
class ErrorTable;
class QAbstractTableModel;
namespace Plugins {
    class IConsole;
}

class DummyTitle : public QWidget
{
    Q_OBJECT
public:
    explicit DummyTitle(QWidget *parent = 0) : QWidget(parent){;}
    virtual QSize minimumSizeHint() const;
    virtual QSize sizeHint() const;
};

class BottomDockWidget : public QDockWidget
{
    Q_OBJECT
public:
    explicit BottomDockWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
    explicit BottomDockWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0);
    Plugins::IConsole * console();
    QWidget * consoleWindow();
protected:
    void showEvent(QShowEvent *);
public slots:
    void errorListChanged(QAbstractTableModel*);
private:
    void init();
    QWidget * createWidget();
public slots:
    void modeSelected(DockShowMode);
signals:
    void jimpCurrentFileLine(int);
    void dockModeSelected(DockShowMode);
private:
    int _restoreHeight;
    QStackedWidget *_stack;
    Console *_console;
    SearchResult *_search;
    ErrorTable *_errors;
};

#endif // BOTTOMDOCKWIDGET_H
